#!/usr/bin/env python 
# -*- coding:utf-8 -*-
#作者：胡莹
import MySQLdb

def query():
    c.execute("select * from student where gender='男'")
    all = c.fetchall()
    print(all)
 c.execute("select * from student where gender='男'")
    one = c.fetchone()  # 从all里面抽取第一条显示 None
    print(one)












if __name__ = '__main__':
    con = MySQLdb.connect(user='root', passwd='2940053asd', db='hy')
    c = con.cursor()

